package com.game.baseMc
{
	import com.game.btnClass.AddMouseEvent;
	import com.game.display.AutoGCMovieClip;
	import com.game.tips.TipCtrl;
	import com.game.utils.GlobalFun;
	
	import flash.display.DisplayObject;
	import flash.filters.ColorMatrixFilter;
	
	public class BaseMc extends AutoGCMovieClip
	{
		
		protected var _tipList:Array=[];
		protected var _noFilter:Array= [new ColorMatrixFilter([0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0])];
		protected var _btnEventList:Vector.<AddMouseEvent>=new Vector.<AddMouseEvent>();
		protected var _tipCtrl:TipCtrl=TipCtrl.getInstance();
		public function BaseMc()
		{
			super();
		}
		protected function gcBaseMc():void{
			GlobalFun.delListMouseEvent(_btnEventList)
			_btnEventList=null;
			if(_tipList==null){
				return;
			}
			for(var i:uint=0;i<_tipList.length;i++){
				_tipCtrl.removeTarget(_tipList[i]);
			}
			_tipList=null;
		}
		protected function addTip(target:DisplayObject, content:Object = null, needBg:Boolean = true):void
		{
			if(_tipList==null){
				_tipList=[];
			}
			_tipList.push(target);
			_tipCtrl.addTarget(target,content,needBg);
		}
		
		
	}
}